{__NOLAYOUT__}
<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <title>{$title}-{$seo_title}</title>
    <include file="Index:meta" />
    <!-- Swiper -->
    <link href="https://cdnjs.cloudflare.com/ajax/libs/Swiper/3.4.2/css/swiper.min.css" rel="stylesheet">
    <script>
        var keshi = {$keshi} ;
        var isuser = {$isuser} ;
        if(keshi == 2){
            alert('您没有权限观看') ;
            if(isuser == 2){
                window.location.href='http://user.fjhgkj.com.cn/index.php?u=zy&url={$url1}' ;
            }else{
                window.location.href='index.php?m=Index&a=details&pid={$zyid.zyid}&cid={$xminfo.gwid}&oid={$xmid.xmid}' ;
            }
        }
    </script>

</head>

<body>
    <div id="page">
        <!-- Header -->
        <include file="Index:header" />
        <!-- Header End -->

        <div class="player">
            <section class="player-video clearfix">
                <if condition="$type eq 'rwid' || $type eq 'wkid'">
                    <iframe id="videosrc" data-play='{$file}' src="index.php?m=Index&a=video&file=http://hgedu.fjhgkj.com/{$file}"></iframe>
                <else />
                    <iframe id="videosrc" class="pdf" data-play='{$file}' src="index.php?m=Index&a=pdf&file={$file}&title={$title|urlencode=###|urlencode=###}"></iframe>
                </if>
            </section>

            <section class="player-main swiper-container">
                <ul class="player-nav clearfix">
                    <li class="active">
                        <a>简介</a>
                    </li>
                    <li>
                        <a>评论</a>
                    </li>
                </ul>
                <div class="swiper-wrapper pt-20">
                    <div class="swiper-slide container">
                        <h2>{$xminfo.description}</h2>
                        <ul class="player-info row text-center">
                            <li class="col-xs-6">
                                <p>{$xminfo.readpoint}</p>
                                <span>
                                    <i class="icon-fwl"></i> 浏览数</span>
                            </li>
                            <li class="col-xs-6">
                                <p id="qw">{$totalsc}</p>
                                <span>
                                    <i class="icon-star"></i> 收藏数</span>
                            </li>
                        </ul>

                        <ul class="player-list">
                            <if condition="$type eq 'rwid'">
                                <volist name='xiangguan' id='vo' key='k'>
                                    <volist name="vo['rwsp']['val']" id="voo">
                                        <li class="clearfix">
                                            <eq name="voo['fileonoff']" value="true">
                                            <a href="index.php?m=Index&a=detailsplay&{$type}={$vo.id.val}&file={$voo.file}&title={$voo.name|urlencode=###|urlencode=###}" title="{$voo.name}">
                                             <else />
                                        <a href="javascript:(new $.zui.ModalTrigger({icon:'info-sign', title:'系统提示',custom:'尊敬的用户：你没有权限观看本内容，请登录相应的权限账号。' })).show();" title="{$voo.name}">
                                            </eq>   
                                                <img src="__PUBLIC__/dist/image/img.jpg" data-src="http://hgedu.fjhgkj.com{$vo.rwspylt.val}" />
                                                <p>{$voo.name}</p>
                                            </a>
                                        </li>
                                    </volist>
                                </volist>
                                <elseif condition="$type eq 'wkid'" />
                                <volist name='xiangguan' id='vo' key='k'>
                                    <li class="clearfix">
                                        <eq name="vo['fileonoff']['val']" value="true">
                                        <a href="index.php?m=Index&a=detailsplay&{$type}={$vo.id.val}&file={$vo['wksp']['val']}&title={$vo['title']['val']|urlencode=###|urlencode=###}" title="{$vo['title']['val']}">
                                        <else />
                                        <a href="javascript:(new $.zui.ModalTrigger({icon:'info-sign', title:'系统提示',custom:'尊敬的用户：你没有权限观看本内容，请登录相应的权限账号。' })).show();" title="{$vo.title.val}">
                                        </eq>   
                                            <img src="__PUBLIC__/dist/image/img.jpg" data-src="http://hgedu.fjhgkj.com{$vo.wktp.val}" />
                                            <p>{$vo.title.val}</p>
                                        </a>
                                    </li>
                                </volist>
                                <elseif condition="$type eq 'kjid'" />
                                <volist name='xiangguan' id='vo' key='k'>
                                    <li class="clearfix">
                                        <eq name="vo['fileonoff']['val']" value="true">
                                        <a href="index.php?m=Index&a=detailsplay&file={$vo.wswj.val}&title={$vo.title.val|urlencode=###|urlencode=###}&kjid={$vo.id.val}" target="_blank" title="{$vo.title.val}"> 
                                        <else />
                                        <a href="javascript:(new $.zui.ModalTrigger({icon:'info-sign', title:'系统提示',custom:'尊敬的用户：你没有权限观看本内容，请登录相应的权限账号。' })).show();" title="{$vo.title.val}">
                                        </eq>    
                                            <img src="__PUBLIC__/dist/image/img.jpg" data-src="http://hgedu.fjhgkj.com{$vo.dzkjylt.val}" />
                                            <p>{$vo.title.val}</p>
                                        </a>
                                    </li>
                                </volist>
                                <elseif condition="$type eq 'dzjc'" />
                                <volist name='xiangguan' id='vo' key='k'>
                                    <li class="clearfix">
                                        <eq name="vo['rwwjonoff']['val']" value="true">
                                        <a href="index.php?m=Index&a=detailsplay&file={$vo.rwwj.val}&title={$vo.title.val|urlencode=###|urlencode=###}&kjid={$vo.id.val}" target="_blank" title="{$vo.title.val}">  
                                         <else />
                                        <a href="javascript:(new $.zui.ModalTrigger({icon:'info-sign', title:'系统提示',custom:'尊敬的用户：你没有权限观看本内容，请登录相应的权限账号。' })).show();" title="{$vo.title.val}">
                                        </eq>    
                                            <img src="__PUBLIC__/dist/image/img.jpg" data-src="http://hgedu.fjhgkj.com{$vo.rwspylt.val}" />
                                            <p>{$vo.title.val}</p>
                                        </a>
                                    </li>
                                </volist>
                            </if>
                        </ul>
                    </div>
                    <div class="swiper-slide container">
                        <ul class="player-pl">
                            <volist name="list" id="vo">
                                <li>
                                    <img src="__PUBLIC__/dist/image/photo.jpg" data-src="{$vo['account']['avatar']}">
                                    <p>
                                        <span class="name">{$realname}</span>
                                        <span class="time">{$vo.createtime}</span>
                                    </p>
                                    <div class="text">{$vo.content}</div>
                                </li>
                            </volist>
                        </ul>
                    </div>
                </div>
            </section>
        </div>

        <div class="player-input none">
            <input type="text" id="pingluncontent">
            <a class='sendpinglun'></a>
        </div>
    </div>

    <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.2.0/jquery.min.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/Swiper/3.4.2/js/swiper.min.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/zui/1.7.0/js/zui.min.js"></script>
    <script src="__PUBLIC__/dist/js/main.js"></script>

    <script>

        $(function () {
            $("#qw").html($(window).height())

$(".player-input").on("click","input",function(){
    $("#qw").html($(window).height())
})


            var swiper = new Swiper('.swiper-container', {
                autoHeight: true,
                prevButton: $(".player-nav li").eq(0),
                nextButton: $(".player-nav li").eq(1),
                onSlideChangeStart: function () {
                    $(".player-nav li").removeClass("active");
                    $(".player-nav li").eq(swiper.activeIndex).addClass("active");

                    if (swiper.activeIndex) {
                        $(".player-input").removeClass("none");
                    } else {
                        $(".player-input").addClass("none");
                    }

                },
            })

            var pdf = $(".pdf");
            pdf.css({
                "height": $(window).height() - 97 + "px",
                "max-height": $(window).height() - 97 + "px"
            });

            $(".icon-star").parent().on("click", function () {
                $(this).find("i").toggleClass("on");
            })

            $('.sendpinglun').on('click', function () {
                var content = $("#pingluncontent").val();
                if (content == '') {
                    alert('请先输入内容');
                    return false;
                }

                var src = $("#videosrc").attr("data-play");
                var typeid = '{$typeid}';
                var type = '{$type}';
                $.ajax({
                    type: "POST",
                    url: "index.php?g=Home&m=Index&a=savecontent",
                    data: "content=" + content + "&src=" + src + "&typeid=" + typeid + "&type=" + type,
                    dataType: "json",
                    success: function (resp) {
                        if (resp.code == '0002') {
                            alert(resp.msg);
                            window.location.href = "http://user.fjhgkj.com.cn/index.php?u=zy&url={$url1}";
                        } else if (resp.code == '0001') {
                            alert(resp.msg);
                            return false ;
                        } else {
                            var html = '<li>';
                            html += '<img src="' + resp.ping.avatar + '">';
                            html += '<p><span class="name">{$realname}</span><span class="time">' + resp.ping.createtime + '</span></p>';
                            html += '<div class="text">' + resp.ping.content + '</div>';
                            html += '</li>';
                            $(".player-pl").append(html);
                            $("#pingluncontent").val("");
                        }
                    }
                });
            })

        })

    </script>
</body>

</html>